<?php
include("include/config.inc.php");
$smarty = new Smarty;
$partyArray = array();

$selectParty = "SELECT partyId,partyName,mobile1,mobile2,add1,add2,taluko,dist,city,pin
                      FROM party
                     LEFT JOIN city ON city.cityId = party.cityId
                     ORDER BY partyName";
$selectPartyRes = mysql_query($selectParty);
$i=0;
while($partyRow = mysql_fetch_array($selectPartyRes))
{
	$partyArray[$i]['partyId']   = $partyRow['partyId'];
	$partyArray[$i]['partyName'] = $partyRow['partyName'];
	$partyArray[$i]['mobile1']   = $partyRow['mobile1'];
	$partyArray[$i]['mobile2']   = $partyRow['mobile2'];
	$partyArray[$i]['add1']      = $partyRow['add1'];
	$partyArray[$i]['add2']      = $partyRow['add2'];
	$partyArray[$i]['taluko']    = $partyRow['taluko'];
	$partyArray[$i]['dist']      = $partyRow['dist'];
	$partyArray[$i]['city']      = $partyRow['city'];
	$partyArray[$i]['pin']       = $partyRow['pin'];
	$i++;
}
include("./bottom.php");
$smarty->assign("partyArray",$partyArray);
$smarty->display('address.tpl');
?>
